<template>
  <div class="download">
    <div class="topClass">
      <img src="../../assets/images/pubilc/million.png" alt="">
      <div class="close" @click="close">
        <img  src="../../assets/images/pubilc/close.png" alt="">
      </div>
    </div>
    <div class="content">
      <div class="c_desc">
        <div>分享商品最高可得 <span class="money">{{ share.reward }}</span> 元</div>
        <div class="info" v-if="share.latest_avatars.length != 0" @click="sharemenoey">
          <div class="left">
            <ul>
              <li v-for="(item, index) in share.latest_avatars" :key="index">
                <img :src="item" alt="">
              </li>
            </ul>
          </div>
          <div class="center">商品累计已有{{ share.success_sum }}人推荐成功<img class="right" src="../../assets/images/pubilc/icon_return_gray.png" alt=""></div>

        </div>
        <div class="info" v-else><div class="center">暂时还未有人推广成功</div></div>
      </div>
      <div class="bottom" @click="sharemenoey">分享赚佣金</div>
    </div>
  </div>
</template>

<script>
export default {
  props: ['share'],
  methods: {
    sharemenoey () {
      this.$emit('sharegoods', true)
    },
    close (){
      this.$emit('sharegoods', false)
    }
  }
}
</script>

<style lang="scss" scoped>
.download {
  background-size: cover;
  text-align: center;
  .topClass {
    margin-bottom: -15px;
    background: none;
    position: relative;
    .close {
      position: absolute;
      right: 0px;
      top: 0px;
      width: 26px;
      height: 26px;
      display: flex;
      align-items: center;
      justify-content: center;
      img {
        width: 14px;
        height: 14px;
      }
    }
    img {
      display: block;
    }
  }
  .content {
    background: #ffffff;
    .info{
      color: #999999;
      font-size: 13px;
      margin-top: 13px;
      display: flex;
      justify-content: center;
      align-items: center;
      height: 17px;
      .left {
        ul {
          display: flex;
          margin-right: 7px;
           li {
             width: 18px;
             height: 18px;
             display: flex;
             align-items: center;
             justify-content: center;
             margin-left: -7px;
             background: #ffffff;
             border-radius: 50%;
             overflow: hidden;
             img {
               width: 15px;
               height: 15px;
               border-radius: 50%;
               display: flex;

             }
           }
        }
      }
      .right {
        width: 6px;
        height: 9px;
        margin-left: 10px;
      }
    }
  }
  .c_desc {
    padding-top: 50px;
    height: 238px;
    font-size: 14px;
    color: rgba(47, 47, 47, 1);
    font-size: 19px;
    .money {
      font-size: 30px;
      line-height: 30px;
      position: relative;
      top: 2px;
      color: #FF0015;
      font-weight:bold;
    }
  }
  .bottom {
    width: 296px;
    height: 46px;
    // background: #ffdd07;
    background: #ffdd07;
    border-radius: 50px;
    color: rgba(47, 47, 47, 1);
    font-size: 16px;
    box-shadow:0px 2px 6px 0px rgba(241,209,7,0.3);
    line-height: 46px;
    text-align: center;
    position: absolute;
    bottom: 46px;
    margin: 0 40px;
  }
}
</style>
